package com.继承.demo02;

public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.setName("旺财");
        dog.setAge(3);
        dog.dog();
        System.out.println(dog);
        System.out.println("--------");
        Cat cat = new Cat();
        cat.setName("可乐");
        cat.setAge(1);
        cat.cat();
        System.out.println(cat);
    }
}
